package zy.data.food.exception;


import zy.data.food.enums.ResultEnum;

public class SellException extends RuntimeException {

    private Integer code;

    public SellException(ResultEnum resultEnum){

        //将消息传给父类
        super(resultEnum.getMessage());

        this.code = resultEnum.getCode();

    }

    public SellException(Integer code,String message) {
        super(message);
        this.code = code;
    }
}
